<?php
class GenreDominanModel extends CI_Model {
	function getIdGenre($genre){
		$this->db->select('GENREID');
		$this->db->from('genredominan');
		$this->db->where('GENREDOM',$genre);
		$data = $this->db->get();
		return $data;
	}
	
	function getGenre($genreid){
//		$this->db->select('GENREDOM');
//		$this->db->from('genredominan');
//		$this->db->where('GENREID',$genreid);
//		$data = $this->db->get();
		$sql = "select GENREDOM from genredominan where GENREID = $genreid";
		$data = $this->db->query($sql);
		return $data;
	}
	
	function getAllGenre() {
		$sql = "select * from genredominan";
		$data = $this->db->query($sql);
		return $data;
	}
}

?>